# Maintainer: Santiago Torres-Arias <santiago@archlinux.org>
# Contributor: Aleksandar Trifunović <akstrfn at gmail dot com>
# Contributor: Matt Spaulding <matt at mattops dot io>
# Contributor: pyjano <pyjano at protonmail dot com>
# Contributor: Stefan Husmann <stefan-husmann@t-online.de>
# Contributor: Adrià Arrufat <swiftscythe@gmail.com>
# Contributor: Utkarsh Singh <utkarsh190601@gmail.com>

pkgname=ttf-ibm-plex
pkgver=6.3.0
pkgrel=1
pkgdesc="IBM Plex Mono, Sans, and Serif"
arch=('any')
url='https://github.com/IBM/plex'
license=('custom:OFL')
source=("${pkgname}-${pkgver}.zip::${url}/releases/download/v${pkgver}/TrueType.zip")
provides=('ttf-font')
sha256sums=('eeb8fdd14234b263a73051bd312ca224eb548eb76a288c28164b67d87e779034')
conflicts=('ibm-plex-fonts')

package() {
    cd TrueType
    find -name *.ttf ! -path "*/unhinted/*" \
         -exec install -Dm644 {} -t "${pkgdir}/usr/share/fonts/TTF" \;

    # All the other licenses are the same as the one here...
    install -Dm644 IBM-Plex-Mono/license.txt -t "${pkgdir}/usr/share/licenses/${pkgname}"
}
